<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>立方体图片</title>
    <style>
        html{
            perspective: 800px;
        }
        .cube{
            width:200px;
            height:200px;
            /* background-color:#bfa; */
            margin:100px auto;
            /*3d变形效果*/
            transform-style:preserve-3d;
            /* 旋转父元素*/
            transform:rotateX(45deg) rotateZ(45deg);
            animation: rotate 20s infinite linear; 
            /* transform: rotateY(45deg) scaleZ(3) ; */
        }
        .cube > div{
            width:200px;
            height:200px;
            /*为元素设置透明透明效果*/
            /* opacity: 0.7; */
            position: absolute;
        }
        img{
            width:200px;
            height:200px;
            /*去除下边框*/
            vertical-align: top;
        }
        .box1{
            /*右面  平移*/
            transform: rotateY(90deg) translateZ(100px);
        }
        .box2{
            /*左面  平移*/
            transform: rotateY(-90deg) translateZ(100px);
        }
        .box3{/*上面*/
            transform: rotateX(90deg) translateZ(100px);
        }
        .box4{/*下面*/
            transform: rotateX(-90deg) translateZ(100px);
        }
        .box5{
            transform:rotateY(0deg) translateZ(100px) ; 
        }
        .box6{
             /*前面*/
             transform:rotateY(180deg) translateZ(100px) ;
        }
        @keyframes rotate{
            from{
                transform: rotateX(0) rotateZ(0);
            }
            to{
                transform:rotateX(1turn) rotateZ(0);
            }
        }

    </style>
</head>
<body>
    <!--创建外部容器-->
    <div class="cube">
        <!--引入图片-->
        <div class="box1">
            <img src="./3Dpicture/1.jpg">
        </div>
        <div class="box2">
            <img src="./3Dpicture/2.jpg">
        </div>
        <div class="box3">
            <img src="./3Dpicture/3.jpg">
        </div>
        <div class="box4">
            <img src="./3Dpicture/4.jpg">
        </div>
        <div class="box5">
            <img src="./3Dpicture/5.jpg">
        </div>
        <div class="box6">
            <img src="./3Dpicture/6.jpg">
        </div>
    </div>
    
</body>
</html>
